//结构体指针
#include "stdio.h"

int main(int argc, char const *argv[]) {
  struct date{
    int year;
    int month;
    int day;
  };

  struct date today,*datePtr;

  datePtr = &today;

  datePtr->year = 2017;
  datePtr->month = 9;
  datePtr-> day = 6;

  printf("Today's date is %i-%.2i-%.2i\n",datePtr->year,datePtr->month,datePtr->day );
  printf("Today's date is %i-%.2i-%.2i\n",today.year,today.month,today.day );

  return 0;
}
